package com.aliyun.dao;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.aliyun.bean.QueryPara;

@Component("aliyunDao")
@Transactional
public class AliyunDao extends CommonDao{
	
	public int insertAliyunHuaKuai(Map<String, String> map)throws SQLException{
		return this.getSqlSession().insert("com.aliyun.dao.AliyunMapper.insertAliyunHuaKuai",map);
	}
	
	public List<Map<String, Object>> getAliyunSession(QueryPara qp)throws SQLException{
        //ȡ����,ɾ��
		List<Map<String, Object>> list = this.getSqlSession().selectList("com.aliyun.dao.AliyunMapper.getAliyunSession",qp);
		if(list!=null && list.size()>0){
			for(Map<String, Object> mp : list){
				this.getSqlSession().delete("com.aliyun.dao.AliyunMapper.deleteAliyunSession",mp);
			}
		}
		return list;
    }
}
